package ws.very.util.akka.rtc

import ws.very.util.akka.actor.ReplyAct

trait Compiler extends ReplyAct {
  def receive = {
    case ("eval", code: S) => tryReply {
      import scala.tools.reflect.ToolBox
      val tb = scala.reflect.runtime.currentMirror.mkToolBox()
      val tree = tb.parse(code)
      tb.eval(tree)
    }

  }
}